﻿using Magellan.Routing;

namespace Magellan.Framework
{
    /// <summary>
    /// Provides information about how this view was navigated to.
    /// </summary>
    public class NavigationContext
    {
        private readonly INavigator _navigator;
        private readonly NavigationRequest _navigationRequest;

        /// <summary>
        /// Initializes a new instance of the <see cref="NavigationContext"/> class.
        /// </summary>
        /// <param name="navigator">The navigator.</param>
        /// <param name="navigationRequest">The navigation request.</param>
        public NavigationContext(INavigator navigator, NavigationRequest navigationRequest)
        {
            _navigator = navigator;
            _navigationRequest = navigationRequest;
        }

        /// <summary>
        /// Gets the navigator.
        /// </summary>
        /// <value>The navigator.</value>
        public INavigator Navigator
        {
            get { return _navigator; }
        }

        /// <summary>
        /// Gets the navigation request.
        /// </summary>
        /// <value>The navigation request.</value>
        public NavigationRequest NavigationRequest
        {
            get { return _navigationRequest; }
        }
    }
}